import _fetch from 'utils/fetch'

export function login (username, password) {
  return _fetch({
    url: '/user/login',
    data: {
      username,
      password
    }
  })
}

export function logout () {
  return _fetch({
    url: '/user/logout'
  })
}

export function getInfo (token) {
  return _fetch({
    url: '/user/info',
    params: {token}
  })
}
